.class public Lcom/uucun/adsdk/OfferActivity;
.super Landroid/app/Activity;


# static fields
.field public static final a:Ljava/lang/String;


# instance fields
.field private b:Lcom/uucun/adsdk/view/OfferwallView;

.field private c:Landroid/os/Handler;

.field private d:Landroid/widget/ProgressBar;

.field private e:Landroid/widget/RelativeLayout;

.field private f:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const-class v0, Lcom/uucun/adsdk/OfferActivity;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/uucun/adsdk/OfferActivity;->a:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    iput-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->b:Lcom/uucun/adsdk/view/OfferwallView;

    iput-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->c:Landroid/os/Handler;

    iput-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    iput-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->e:Landroid/widget/RelativeLayout;

    const-string v0, "javascript:changePoint(\"%s\",\"%s\",\"%s\");"

    iput-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->f:Ljava/lang/String;

    return-void
.end method

.method private a(II)Landroid/widget/RelativeLayout$LayoutParams;
    .locals 1

    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v0, p1, p2}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    return-object v0
.end method

.method private d()V
    .locals 7

    const/16 v6, 0xa

    const/4 v5, -0x1

    new-instance v0, Landroid/widget/RelativeLayout;

    invoke-virtual {p0}, Lcom/uucun/adsdk/OfferActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->e:Landroid/widget/RelativeLayout;

    invoke-direct {p0, v5, v5}, Lcom/uucun/adsdk/OfferActivity;->a(II)Landroid/widget/RelativeLayout$LayoutParams;

    move-result-object v0

    invoke-direct {p0, v5, v6}, Lcom/uucun/adsdk/OfferActivity;->a(II)Landroid/widget/RelativeLayout$LayoutParams;

    move-result-object v1

    iget-object v2, p0, Lcom/uucun/adsdk/OfferActivity;->e:Landroid/widget/RelativeLayout;

    invoke-virtual {v2, v0}, Landroid/widget/RelativeLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    new-instance v2, Lcom/uucun/adsdk/view/OfferwallView;

    iget-object v3, p0, Lcom/uucun/adsdk/OfferActivity;->c:Landroid/os/Handler;

    invoke-direct {v2, v3, p0}, Lcom/uucun/adsdk/view/OfferwallView;-><init>(Landroid/os/Handler;Landroid/content/Context;)V

    iput-object v2, p0, Lcom/uucun/adsdk/OfferActivity;->b:Lcom/uucun/adsdk/view/OfferwallView;

    iget-object v2, p0, Lcom/uucun/adsdk/OfferActivity;->e:Landroid/widget/RelativeLayout;

    iget-object v3, p0, Lcom/uucun/adsdk/OfferActivity;->b:Lcom/uucun/adsdk/view/OfferwallView;

    invoke-virtual {v2, v3}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    iget-object v2, p0, Lcom/uucun/adsdk/OfferActivity;->b:Lcom/uucun/adsdk/view/OfferwallView;

    invoke-virtual {v2, v0}, Lcom/uucun/adsdk/view/OfferwallView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->e:Landroid/widget/RelativeLayout;

    invoke-virtual {p0, v0}, Lcom/uucun/adsdk/OfferActivity;->setContentView(Landroid/view/View;)V

    new-instance v0, Landroid/widget/ProgressBar;

    invoke-virtual {p0}, Lcom/uucun/adsdk/OfferActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    const/4 v3, 0x0

    const v4, 0x1010078

    invoke-direct {v0, v2, v3, v4}, Landroid/widget/ProgressBar;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    iput-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    const/16 v2, 0x64

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setMax(I)V

    invoke-virtual {v1, v6, v5}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->e:Landroid/widget/RelativeLayout;

    iget-object v1, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    return-void
.end method


# virtual methods
.method public a()Landroid/os/Handler;
    .locals 1

    new-instance v0, Lcom/uucun/adsdk/c;

    invoke-direct {v0, p0}, Lcom/uucun/adsdk/c;-><init>(Lcom/uucun/adsdk/OfferActivity;)V

    return-object v0
.end method

.method public a(I)V
    .locals 1

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    invoke-virtual {v0, p1}, Landroid/widget/ProgressBar;->setProgress(I)V

    return-void
.end method

.method public b()V
    .locals 3

    const/4 v2, 0x0

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    const/16 v1, 0x64

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setMax(I)V

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setProgress(I)V

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setVisibility(I)V

    return-void
.end method

.method public c()V
    .locals 2

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->d:Landroid/widget/ProgressBar;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1

    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/uucun/adsdk/OfferActivity;->requestWindowFeature(I)Z

    invoke-virtual {p0}, Lcom/uucun/adsdk/OfferActivity;->a()Landroid/os/Handler;

    move-result-object v0

    iput-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->c:Landroid/os/Handler;

    invoke-direct {p0}, Lcom/uucun/adsdk/OfferActivity;->d()V

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->b:Lcom/uucun/adsdk/view/OfferwallView;

    invoke-virtual {v0}, Lcom/uucun/adsdk/view/OfferwallView;->a()V

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->b:Lcom/uucun/adsdk/view/OfferwallView;

    invoke-virtual {v0}, Lcom/uucun/adsdk/view/OfferwallView;->b()V

    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 1

    const/4 v0, 0x4

    if-eq p1, v0, :cond_0

    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->b:Lcom/uucun/adsdk/view/OfferwallView;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->b:Lcom/uucun/adsdk/view/OfferwallView;

    invoke-virtual {v0}, Lcom/uucun/adsdk/view/OfferwallView;->canGoBack()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/uucun/adsdk/OfferActivity;->b:Lcom/uucun/adsdk/view/OfferwallView;

    invoke-virtual {v0}, Lcom/uucun/adsdk/view/OfferwallView;->goBack()V

    :goto_1
    const/4 v0, 0x1

    goto :goto_0

    :cond_1
    invoke-virtual {p0}, Lcom/uucun/adsdk/OfferActivity;->finish()V

    goto :goto_1

    :cond_2
    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_0
.end method

.method protected onResume()V
    .locals 11

    const/4 v10, 0x0

    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    invoke-virtual {p0}, Lcom/uucun/adsdk/OfferActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/uucun/adsdk/b/a;->a(Landroid/content/Context;)Lcom/uucun/adsdk/b/a;

    move-result-object v0

    const-string v1, "n_ad_pg"

    const-string v2, ""

    invoke-virtual {v0, v1, v2}, Lcom/uucun/adsdk/b/a;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_0

    invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_2

    :cond_0
    sget-object v0, Lcom/uucun/adsdk/OfferActivity;->a:Ljava/lang/String;

    const-string v1, "package or adid is null..."

    invoke-static {v0, v1}, Lcom/uucun/adsdk/b/h;->c(Ljava/lang/String;Ljava/lang/String;)V

    :cond_1
    :goto_0
    return-void

    :cond_2
    const-string v2, ","

    invoke-virtual {v1, v2}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_1

    array-length v2, v1

    if-lez v2, :cond_1

    array-length v2, v1

    move v3, v10

    :goto_1
    if-ge v3, v2, :cond_5

    aget-object v4, v1, v3

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "_adid"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    const-string v6, ""

    invoke-virtual {v0, v5, v6}, Lcom/uucun/adsdk/b/a;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    if-eqz v4, :cond_3

    invoke-virtual {v4}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v6

    if-nez v6, :cond_3

    if-eqz v5, :cond_3

    invoke-virtual {v5}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v6

    if-eqz v6, :cond_4

    :cond_3
    sget-object v4, Lcom/uucun/adsdk/OfferActivity;->a:Ljava/lang/String;

    const-string v5, "package or adid is null..."

    invoke-static {v4, v5}, Lcom/uucun/adsdk/b/h;->c(Ljava/lang/String;Ljava/lang/String;)V

    :goto_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_1

    :cond_4
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, "_points"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6, v10}, Lcom/uucun/adsdk/b/a;->b(Ljava/lang/String;I)I

    move-result v6

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v7, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "_points"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v0, v7}, Lcom/uucun/adsdk/b/a;->a(Ljava/lang/String;)V

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v7, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "_adid"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v0, v7}, Lcom/uucun/adsdk/b/a;->a(Ljava/lang/String;)V

    sget-object v7, Lcom/uucun/adsdk/OfferActivity;->a:Ljava/lang/String;

    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    const-string v9, " Chage Point package:"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "  Points:"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, " adId:"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v7, v8}, Lcom/uucun/adsdk/b/h;->c(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v7, p0, Lcom/uucun/adsdk/OfferActivity;->f:Ljava/lang/String;

    const/4 v8, 0x3

    new-array v8, v8, [Ljava/lang/Object;

    invoke-virtual {v4}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v8, v10

    const/4 v4, 0x1

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v9

    aput-object v9, v8, v4

    const/4 v4, 0x2

    invoke-virtual {v5}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v5

    aput-object v5, v8, v4

    invoke-static {v7, v8}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    if-eqz v6, :cond_1

    sget-object v5, Lcom/uucun/adsdk/OfferActivity;->a:Ljava/lang/String;

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string v7, "change points:"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Lcom/uucun/adsdk/b/h;->c(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v5, p0, Lcom/uucun/adsdk/OfferActivity;->b:Lcom/uucun/adsdk/view/OfferwallView;

    invoke-virtual {v5, v4}, Lcom/uucun/adsdk/view/OfferwallView;->loadUrl(Ljava/lang/String;)V

    goto/16 :goto_2

    :cond_5
    const-string v1, "n_ad_pg"

    invoke-virtual {v0, v1}, Lcom/uucun/adsdk/b/a;->a(Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/uucun/adsdk/b/a;->a()V

    goto/16 :goto_0
.end method
